﻿package com.google.code.p.ivans.patternsentities;

public class MenuItem implements Menu {
	
	String title;
	Handler handler;
	
	public MenuItem() {}
	
	public MenuItem(String title, Handler handler) {
		this.title = title;
		this.handler = handler;
	}

	@Override
	public void render() {
		System.out.println(title);		
	}

	@Override
	public void click() {
		handler.handle();		
	}

}
